import java.util.StringTokenizer;
public class Circle extends State
  {
  private int x;
  private int y;
  private int r;
  private boolean writable;
  public Circle(String s,int x,int y,int r)
    {
    this(x,y,r);
    setLabel(s);
    }
  public Circle(int x,int y,int r)
    {
    this.x=x;
    this.y=y;
    this.r=r;
    writable=true;
    }
  public Circle(Circle circle)
    {
    this.x=circle.getX();
    this.y=circle.getY();
    this.r=circle.getR();
    }
  public void setX(int x)
    {
    this.x=x;
    }
  public void setY(int y)
    {
    this.y=y;
    }
  public void setR(int r)
    {
    this.r=r;
    }
  public int getX()
    {
    return x;
    }
  public int getY()
    {
    return y;
    }
  public int getR()
    {
    return r;
    }
  public void setPosition(int x,int y)
    {
    setX(x);
    setY(y);
    }
  public void setPosition(Circle circle)
    {
    setX(circle.getX());
    setY(circle.getY());
    }
  public void move(int x,int y)
    {
    setX(this.x+x);
    setY(this.y+y);
    }
  public boolean contains(int px,int py)
    {
    int dx=px-x;
    int dy=py-y;
    return (dx*dx+dy*dy)<=(r*r);
    }
  public void setWritable(boolean w)
    {
    writable=w;
    }
  public boolean isWritable()
    {
    return writable;
    }
  public String toString()
    {
    return getLabel()+"\t"+getX()+"\t"+getY();
    }
  }